package com.go.where.family.component.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.go.where.family.component.ActivityComponent;
import com.go.where.family.constants.Constant;
import com.go.where.family.constants.TransmissionCode;
import com.go.where.family.exception.ServerDisponseException;
import com.go.where.family.pojo.ActivityInfo;
import com.go.where.family.pojo.ActivityRetrospectInfo;
import com.go.where.family.pojo.ActivitySignupInfo;
import com.go.where.family.pojo.BigClassInfo;
import com.go.where.family.pojo.CustomerAttentionInfo;
import com.go.where.family.pojo.DonateRetrospectInfo;
import com.go.where.family.pojo.SmallClassInfo;
import com.go.where.family.pojo.VideoInfo;
import com.go.where.family.scoket.Head;
import com.go.where.family.service.ActivityService;
import com.go.where.family.service.CustomerAttentionService;
import com.go.where.family.service.DonateRetrospectService;
import com.go.where.family.service.VideoService;
import com.go.where.family.utils.CommonUtil;
import com.go.where.family.vo.ActivityRetrospectVo;
import com.go.where.family.vo.ActivitySignupVo;
import com.go.where.family.vo.ActivityVo;
import com.go.where.family.vo.HomeSearchVo;
import com.google.gson.Gson;

@Component("activityComponent")
public class ActivityComponentImpl implements ActivityComponent {

	private static final Logger log = Logger
			.getLogger(ActivityComponentImpl.class);
	private Gson gson;
	@Resource(name = "activityService")
	private ActivityService activityService;
	@Resource(name = "videoService")
	private VideoService videoService;
	// @Resource(name = "customerService")
	// private CustomerService customerService;
	@Resource(name = "donateRetrospectService")
	private DonateRetrospectService donateRetrospectService;
	@Resource(name = "customerAttentionService")
	private CustomerAttentionService customerAttentionService;

	public ActivityComponentImpl() {
		gson = CommonUtil.gson();
	}

	@Override
	public List<ActivityInfo> queryList(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("activityTitle", vo.getActivityTitle());
			paraMap.put("isLimitTime", vo.getIsLimitTime());
			paraMap.put("bigClassId", vo.getBigClassId());
			paraMap.put("smallClassId", vo.getSmallClassId());
			if (vo.isMerchantRole()) {
				paraMap.put("mroleId", CommonUtil
						.getProperties("system.merchant.role.id"));
				paraMap.put("isLimitTime", "");
			} else {
				paraMap.put("roleId", CommonUtil
						.getProperties("system.merchant.role.id"));
			}
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					if ("attention_num".equals(vo.getOrderBy())) {
						paraMap.put("page_orderByAsc", vo.getOrderBy());
					} else {
						paraMap.put("page_orderByAsc", "fa." + vo.getOrderBy());
					}
				} else {
					if ("attention_num".equals(vo.getOrderBy())) {
						paraMap.put("page_orderByDesc", vo.getOrderBy());
					} else {
						paraMap
								.put("page_orderByDesc", "fa."
										+ vo.getOrderBy());
					}
				}
			}
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			List<ActivityInfo> list = activityService.queryList(paraMap);
			if (list != null && !list.isEmpty()) {
				for (ActivityInfo activ : list) {
					if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
						activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
								+ activ.getPrePhotoPath());
					}
					if (StringUtils.isNotBlank(activ.getSignupPhotoPath())) {
						activ.setSignupPhotoPath(CommonUtil.getUrlPrefix()
								+ activ.getSignupPhotoPath());
					}
					String activityId = activ.getActivityId();
					String customerId = vo.getCustomerId();
					CustomerAttentionInfo cai = new CustomerAttentionInfo();
					cai.setActivityId(activityId);
					cai.setCustomerId(customerId);
					CustomerAttentionInfo att = customerAttentionService
							.queryParameter(cai);
					if (att != null) {
						activ.setIsAttention(true);
					} else {
						activ.setIsAttention(false);
					}
				}
				return list;
			} else {
				return new ArrayList<ActivityInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取活动列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public boolean update(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			ActivityInfo act = activityService.queryActivityDetail(vo
					.getActivityId());
			if (act != null) {
				Integer likeNum = act.getLikeNum();
				if (StringUtils.isNotBlank(vo.getLikeOrNot())) {
					if ("1".equals(vo.getLikeOrNot())) {
						likeNum = CommonUtil.add(likeNum, 1);
					} else if ("0".equals(vo.getLikeOrNot())) {
						likeNum = CommonUtil.sub(likeNum, 1);
					}
				}
				ActivityInfo info = new ActivityInfo();
				info.setActivityId(vo.getActivityId());
				info.setLikeNum(likeNum);
				int result = activityService.update(info);
				if (result > 0) {
					return true;
				} else {
					log.info("requestId:" + head.getRequestId()
							+ ",更新活动信息时，更新异常。活动Id：" + vo.getActivityId());
					return false;
				}
			} else {
				log.info("requestId:" + head.getRequestId()
						+ ",更新活动点赞量时,没有查询到数据,活动ID：" + vo.getActivityId());
				throw new ServerDisponseException(TransmissionCode.NO_DATA
						.getCode(), TransmissionCode.NO_DATA.getMessage());
			}
		} else {
			log.info("requestId:" + head.getRequestId() + ",更新活动信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public ActivityInfo queryActivityDetail(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			ActivityInfo activ = activityService.queryActivityDetail(vo
					.getActivityId());
			if (activ != null) {
				if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
					activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
							+ activ.getPrePhotoPath());
				}
				if (StringUtils.isNotBlank(activ.getSignupPhotoPath())) {
					activ.setSignupPhotoPath(CommonUtil.getUrlPrefix()
							+ activ.getSignupPhotoPath());
				}
				String activityId = activ.getActivityId();
				String customerId = vo.getCustomerId();
				CustomerAttentionInfo cai = new CustomerAttentionInfo();
				cai.setActivityId(activityId);
				cai.setCustomerId(customerId);
				CustomerAttentionInfo att = customerAttentionService
						.queryParameter(cai);
				if (att != null) {
					activ.setIsAttention(true);
				} else {
					activ.setIsAttention(false);
				}
				return activ;
			} else {
				log.info("requestId:" + head.getRequestId()
						+ ",查询活动详情信息时,没有查询到数据。活动ID：" + vo.getActivityId());
				throw new ServerDisponseException(TransmissionCode.NO_DATA
						.getCode(), TransmissionCode.NO_DATA.getMessage());
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",查询活动详情信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public List<ActivityRetrospectInfo> queryRetroList(String body, Head head) {
		ActivityRetrospectVo vo = gson.fromJson(body,
				ActivityRetrospectVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("activityTitle", vo.getActivityTitle());
			paraMap.put("activityId", vo.getActivityId());
			paraMap.put("bigClassId", vo.getBigClassId());
			paraMap.put("smallClassId", vo.getSmallClassId());
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					paraMap.put("page_orderByAsc", vo.getOrderBy());
				} else {
					paraMap.put("page_orderByDesc", vo.getOrderBy());
				}
			}
			List<ActivityRetrospectInfo> list = activityService
					.queryRetroList(paraMap);
			if (list != null && !list.isEmpty()) {
				if (list != null && !list.isEmpty()) {
					for (ActivityRetrospectInfo activ : list) {
						if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
							activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
									+ activ.getPrePhotoPath());
						}
					}
				}
				return list;
			} else {
				return new ArrayList<ActivityRetrospectInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取活动回顾列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public List<ActivityInfo> queryDonateList(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			List<String> activityIds = donateRetrospectService
					.queryActivityIds();
			if (activityIds != null && !activityIds.isEmpty()) {

				Map<String, Object> paraMap = new HashMap<String, Object>();
				paraMap.put("pageStart", pageStart);
				paraMap.put("pageEnd", pageEnd);
				paraMap.put("activityIds", activityIds);
				paraMap.put("isDelete", Constant.IS_NOT_DELETE);
				if (StringUtils.isNotBlank(vo.getOrderBy())) {
					if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
						if ("attention_num".equals(vo.getOrderBy())) {
							paraMap.put("page_orderByAsc", vo.getOrderBy());
						} else {
							paraMap.put("page_orderByAsc", "fa."
									+ vo.getOrderBy());
						}
					} else {
						if ("attention_num".equals(vo.getOrderBy())) {
							paraMap.put("page_orderByDesc", vo.getOrderBy());
						} else {
							paraMap.put("page_orderByDesc", "fa."
									+ vo.getOrderBy());
						}
					}
				}
				List<ActivityInfo> list = activityService.queryList(paraMap);
				if (list != null && !list.isEmpty()) {
					for (ActivityInfo activ : list) {
						if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
							activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
									+ activ.getPrePhotoPath());
						}
						if (StringUtils.isNotBlank(activ.getSignupPhotoPath())) {
							activ.setSignupPhotoPath(CommonUtil.getUrlPrefix()
									+ activ.getSignupPhotoPath());
						}
					}
					return list;
				} else {
					return new ArrayList<ActivityInfo>();
				}
			} else {
				return new ArrayList<ActivityInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取捐助活动列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public List<ActivitySignupInfo> querySignupList(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}

			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			paraMap.put("customerId", vo.getCustomerId());
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					paraMap.put("page_orderByAsc", vo.getOrderBy());
				} else {
					paraMap.put("page_orderByDesc", vo.getOrderBy());
				}
			}
			List<ActivitySignupInfo> list = activityService
					.querySignUpList(paraMap);
			if (list != null && !list.isEmpty()) {
				return list;
			} else {
				return new ArrayList<ActivitySignupInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取我参加的活动列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public boolean delete(String body, Head head) {
		ActivitySignupVo vo = gson.fromJson(body, ActivitySignupVo.class);
		if (vo != null) {
			ActivitySignupInfo signup = new ActivitySignupInfo();
			signup.setId(vo.getId());
			int re = activityService.delete(signup);
			if (re > 0) {
				return true;
			} else {
				return false;
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",删除我的活动报名信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public boolean deleteAll(String body, Head head) {
		ActivitySignupVo vo = gson.fromJson(body, ActivitySignupVo.class);
		if (vo != null) {
			ActivitySignupInfo signup = new ActivitySignupInfo();
			signup.setCustomerId(vo.getCustomerId());
			int re = activityService.delete(signup);
			if (re > 0) {
				return true;
			} else {
				return false;
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",删除全部活动报名信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public List<BigClassInfo> queryBigClassList(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			if (vo.isMerchantRole()) {
				paraMap.put("mroleId", CommonUtil
						.getProperties("system.merchant.role.id"));
			} else {
				paraMap.put("roleId", CommonUtil
						.getProperties("system.merchant.role.id"));
			}
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					paraMap.put("page_orderByAsc", vo.getOrderBy());
				} else {
					paraMap.put("page_orderByDesc", vo.getOrderBy());
				}
			}
			List<BigClassInfo> list = activityService
					.queryBigClassList(paraMap);
			if (list != null && !list.isEmpty()) {
				for (BigClassInfo activ : list) {
					if (StringUtils.isNotBlank(activ.getIconPath())) {
						activ.setIconPath(CommonUtil.getUrlPrefix()
								+ activ.getIconPath());
					}
				}
				return list;
			} else {
				return new ArrayList<BigClassInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取大类列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}

	}

	@Override
	public List<SmallClassInfo> querySmallClassList(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			paraMap.put("bigClassId", vo.getBigClassId());
			if (vo.isMerchantRole()) {
				paraMap.put("mroleId", CommonUtil
						.getProperties("system.merchant.role.id"));
			} else {
				paraMap.put("roleId", CommonUtil
						.getProperties("system.merchant.role.id"));
			}
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					paraMap.put("page_orderByAsc", vo.getOrderBy());
				} else {
					paraMap.put("page_orderByDesc", vo.getOrderBy());
				}
			}
			List<SmallClassInfo> list = activityService
					.querySmallClassList(paraMap);
			if (list != null && !list.isEmpty()) {
				for (SmallClassInfo activ : list) {
					if (StringUtils.isNotBlank(activ.getIconPath())) {
						activ.setIconPath(CommonUtil.getUrlPrefix()
								+ activ.getIconPath());
					}
				}
				return list;
			} else {
				return new ArrayList<SmallClassInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取小类列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public List<DonateRetrospectInfo> queryDonateRetroList(String body,
			Head head) {
		ActivityRetrospectVo vo = gson.fromJson(body,
				ActivityRetrospectVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("activityId", vo.getActivityId());
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			if (StringUtils.isNotBlank(vo.getOrderBy())) {
				if (Constant.ORDER_TYPE_ASC.equals(vo.getOrderType())) {
					paraMap.put("page_orderByAsc", vo.getOrderBy());
				} else {
					paraMap.put("page_orderByDesc", vo.getOrderBy());
				}
			}
			List<DonateRetrospectInfo> list = donateRetrospectService
					.queryList(paraMap);
			if (list != null && !list.isEmpty()) {
				for (DonateRetrospectInfo activ : list) {
					if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
						activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
								+ activ.getPrePhotoPath());
					}
				}
				return list;
			} else {
				return new ArrayList<DonateRetrospectInfo>();
			}
		} else {
			log.info("requestId:" + head.getRequestId()
					+ ",获取活动回顾列表信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

	@Override
	public HomeSearchVo homeSearch(String body, Head head) {
		ActivityVo vo = gson.fromJson(body, ActivityVo.class);
		if (vo != null) {
			Integer currentPage = vo.getPageIndex();
			Integer pageSize = vo.getPageCount();
			Integer pageStart = 1;
			Integer pageEnd = 10;
			if (currentPage != null && pageSize != null) {
				pageStart = (currentPage - 1) * pageSize + 1;
				pageEnd = currentPage * pageSize;
			}
			Map<String, Object> paraMap = new HashMap<String, Object>();
			paraMap.put("pageStart", pageStart);
			paraMap.put("pageEnd", pageEnd);
			paraMap.put("search", vo.getSearch());
			paraMap.put("isDelete", Constant.IS_NOT_DELETE);
			HomeSearchVo homeVo = new HomeSearchVo();
			List<ActivityInfo> actList = activityService.queryList(paraMap);
			if (actList != null && !actList.isEmpty()) {
				for (ActivityInfo activ : actList) {
					if (StringUtils.isNotBlank(activ.getPrePhotoPath())) {
						activ.setPrePhotoPath(CommonUtil.getUrlPrefix()
								+ activ.getPrePhotoPath());
					}
					if (StringUtils.isNotBlank(activ.getSignupPhotoPath())) {
						activ.setSignupPhotoPath(CommonUtil.getUrlPrefix()
								+ activ.getSignupPhotoPath());
					}
					String activityId = activ.getActivityId();
					String customerId = vo.getCustomerId();
					CustomerAttentionInfo cai = new CustomerAttentionInfo();
					cai.setActivityId(activityId);
					cai.setCustomerId(customerId);
					CustomerAttentionInfo att = customerAttentionService
							.queryParameter(cai);
					if (att != null) {
						activ.setIsAttention(true);
					} else {
						activ.setIsAttention(false);
					}
				}
				homeVo.setActivitys(actList);
			}
			List<VideoInfo> videoList = videoService.queryList(paraMap);
			if (videoList != null && !videoList.isEmpty()) {
				for (VideoInfo vi : videoList) {
					if (StringUtils.isNotBlank(vi.getVideoCover())) {
						vi.setVideoCover(CommonUtil.getUrlPrefix()
								+ vi.getVideoCover());
					}
				}
				homeVo.setVideos(videoList);
			}
			
			return homeVo;
		} else {
			log.info("requestId:" + head.getRequestId() + ",首页搜索信息时，参数报文解析异常。");
			throw new ServerDisponseException(TransmissionCode.ERROR_ADJUST
					.getCode(), TransmissionCode.ERROR_ADJUST.getMessage());
		}
	}

}
